﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace JHelp
{
    /// <summary>
    /// 缓存接口
    /// </summary>
   public  interface  IJCache
    {
       /// <summary>
       ///获取单个缓存
       /// </summary>
       /// <param name="key"></param>
       /// <returns></returns>
       static object GetCache(string key);
       /// <summary>
       /// 增加缓存
       /// </summary>
       /// <param name="key">键</param>
       /// <param name="obj">值</param>
       static void AddCache(string key, object obj);

       /// <summary>
       /// 增加缓存
       /// </summary>
       /// <param name="key">键</param>
       /// <param name="obj">值</param>
       /// <param name="TimeOut">过期时间间隔</param>
       static void AddCache(string key, object obj, TimeSpan TimeOut);

       /// <summary>
       /// 增加缓存
       /// </summary>
       /// <param name="key">键</param>
       /// <param name="obj">值</param>
       /// <param name="absoluteExpiretion">绝对过期时间</param>
       /// <param name="TimeOut"></param>
       static void AddCache(string key, object obj, DateTime absoluteExpiretion, TimeSpan TimeOut);

       /// <summary>
       /// 移除缓存
       /// </summary>
       /// <param name="key">键</param>
       static bool RemoveCache(string key);
   }
}
